package me.muci.abstractFactoryPattern.factory;

import me.muci.abstractFactoryPattern.Color;
import me.muci.abstractFactoryPattern.Shape;
import me.muci.abstractFactoryPattern.impl.Circle;
import me.muci.abstractFactoryPattern.impl.Rectangle;
import me.muci.abstractFactoryPattern.impl.Square;
import org.apache.commons.lang3.StringUtils;

/**
 * ClassName: ShapeFactory <br/>
 * Description: <br/>
 * date: 2021/8/4 15:44<br/>
 *
 * @author muci<br />
 * @description
 * @since JDK 1.8
 */
public class ShapeFactory extends AbstractFactory{
    @Override
    public Color getColor(String color) {
        return null;
    }

    @Override
    public Shape getShape(String shapeType) {
        switch (shapeType){
            case "CIRCLE":
                return new Circle();
            case "RECTANGLE":
                return new Rectangle();
            case "SQUARE":
                return new Square();
            default:
                return null;
        }
    }
}
